#Events#

import EventDataTable
import PeopleOnEventsTable

class Events(EventDataTable.Event_Data, PeopleOnEventsTable.PeopleOnEvents):
    def __init__(self, MySQLObj):
        self.SQLObj = MySQLObj
        EventDataTable.Event_Data.__init__(self, MySQLObj)
        PeopleOnEventsTable.PeopleOnEvents.__init__(self, MySQLObj)
        
    
    def GetEventsPersonOn(self, PID):
        EventObjs = []
        EventEIDs = self.GetAllEventsPersonOn(PID)
        EventDict =  self.GetAllEventsDict()
        for EID, Prop in EventEIDs:
            EventObjs.append(EventDict[EID])
        return EventObjs
    

        
        

def GenerateTables(MySql):
    import EventDataTable
    import PeopleOnEventsTable
    EventDataTable.GenerateTables(MySql)
    PeopleOnEventsTable.GenerateTables(MySql)
    


if __name__ == '__main__':
    pass



    